using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using RecruitmentSystem.Business;
using RecruitmentSystem.Common;
using System.Collections.Generic;

public partial class EnterpriseDetails : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["eid"] != null && Request.QueryString["eid"].ToString() != "0")
            {
                int eid = Convert.ToInt32(Request.QueryString["eid"]);
                BindEnterpriseInfo(eid);
                EnterpriseInfoLeft1.EnterpriseId = eid;
            }
        }
    }

    private void BindEnterpriseInfo(int enterpriseId)
    {
        AccountManager am = new AccountManager();
        EnterpriseUser user = (EnterpriseUser)am.GetUserById(enterpriseId, UserType.EnterpriseUser);
        lbEnterpriseArea.Text = user.Province + user.District;
        lbEnterpriseAsset.Text = user.Asset;
        lbEnterpriseCategory.Text = user.Category;
        lbEnterpriseDesc.Text = user.Description;
        lbEnterpriseName.Text = user.Name;
        lbEnterpriseSize.Text = user.Size;
        lbEnterpriseType.Text = user.EnterpriseType;
    }
}
